<?php

// comment out the following two lines when deployed to production
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

defined('YII_SOFT_PATH') or define('YII_SOFT_PATH', __DIR__ .'/../../yiiframework2');
defined('YII_VENDOR_PATH') or define('YII_VENDOR_PATH', YII_SOFT_PATH. '/vendor');

require YII_SOFT_PATH . '/vendor/autoload.php';
require YII_SOFT_PATH . '/vendor/yiisoft/yii2/Yii.php';

$config = require __DIR__ . '/../config/web.php';

$application = new yii\web\Application($config);
$application->setVendorPath(YII_VENDOR_PATH);
// 暂时没有弄清楚YII2的自动加载机制 手动加上别名
Yii::setAlias('@core', YII_SOFT_PATH. '/core');
$application->run();
